<template>
  <ElConfigProvider :locale="locale">
    <router-view />
  </ElConfigProvider>
</template>

<script lang="ts" setup>
import { useTheme } from "@/hooks/useTheme"
import zhCn from "element-plus/lib/locale/lang/zh-cn"
import { TITLE, VERSION } from '@/config'

const { initTheme } = useTheme()

// 初始化主题
initTheme()
// 将 Element Plus 的语言设置为中文
const locale = zhCn

document.title = `${TITLE}v${VERSION}`

</script>
